{$CLEO .cs}
0000:
:Bumblebee
wait 0
if
0ADC: "Jazz"
jf @Bumblebee
023C: load_special_actor 'Jazz' as 1 // models 290-299 
023C: load_special_actor 'Jazzw' as 2 // models 290-299 
04ED: load_animation "Bumblebee" 
04ED: load_animation "Grenade"
04ED: load_animation "Mixmast"
Model.Load(#NULL)
Model.Load(#SUPERGT)
Model.Load(#BRASSKNUCKLE)
Model.Load(#TEC9)
0390: load_txd_dictionary 'bumb'
038F: load_texture "target" as 1 // Load dictionary with 0390 first  
fade 0 600
jump @Bumblebee_1

:Bumblebee_1
wait 0
if
Model.Available(#SPECIAL01)
jf @Bumblebee_1
$Mask = 0
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01 
0792: disembark_instantly_actor $PLAYER_ACTOR 
048F: actor $PLAYER_ACTOR remove_weapons 
01B2: give_actor $PLAYER_ACTOR weapon 32 ammo 99999 // Load the weapon model before using this
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 32 
0489: set_actor $PLAYER_ACTOR muted 1
01B2: give_actor $PLAYER_ACTOR weapon 1 ammo 9999 // Load the weapon model before using this 
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 1 
0992: set_player $PLAYER_CHAR weapons_scrollable 0 
wait 600
fade 1 600
jump @Bumblebee_2

:Bumblebee_2
wait 0
if
8AB0: not 76
jf @Bee_1033
if
8AB0: not 70
jf @Bee_1035
if
8AB0: not 84
jf @Bumblebee_T
if
8AB0: not 2
jf @Bumblebee_L
if 
8AB0: not 71
jf @Bumblebee_Gr
if
8AB0: not 1
jf @Bumblebee_P
if
8AB0: not 79
jf @Bumblebee_Off
gosub @Camera
Actor.SetImmunities($PLAYER_ACTOR,1,1,1,1,1)
jump @Bumblebee_2

:Bee_1033
wait 0
if
0Ab0: 76
jf @Bumblebee_2
if
$Mask == 0
jf @Bumblebee_2
02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1 
09C7: change_player $PLAYER_CHAR model_to #SPECIAL02
0792: disembark_instantly_actor $PLAYER_ACTOR
$Mask = 1
jump @Bumblebee_2

:Bee_1035
wait 0
if
0Ab0: 70
jf @Bumblebee_2
if
$Mask == 1
jf @Bumblebee_2
02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1 
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01
0792: disembark_instantly_actor $PLAYER_ACTOR
$Mask = 0
jump @Bumblebee_2

:Bumblebee_Off
wait 0
if
0AB0: 79
jf @Bumblebee_2
fade 0 600
wait 600
09C7: change_player $PLAYER_CHAR model_to #NULL 
0792: disembark_instantly_actor $PLAYER_ACTOR 
048F: actor $PLAYER_ACTOR remove_weapons 
Camera.Restore($PLAYER_ACTOR)
jump @Bumblebee_Off_1

:Bumblebee_Off_1
wait 0
0296: unload_special_actor 1 
04EF: release_animation "Bumblebee" 
04EF: release_animation "Grenade" 
Model.Destroy(#NULL)
Model.Destroy(#SUPERGT)
Model.Destroy(#BRASSKNUCKLE)
Model.Destroy(#TEC9)
0391: release_txd_dictionary
fade 1 600 
jump @Bumblebee

:Bumblebee_P
wait 0
if
0AB0: 1
jf @Bumblebee_2
Audiostream.Release(15@)
15@ = Audiostream.Load("CLEO/Sound/step_start.WAV")
Audiostream.PerformAction(15@,PLAY)
Audiostream.Volume(15@) = 350.0
0812: AS_actor $PLAYER_ACTOR perform_animation "FightC_1" IFP_file "Bumblebee" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB  
wait 330
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0
jump @Bumblebee_P_D

:Bumblebee_P_D
wait 0
if
0AE1: $actor = random_actor_near_point 0@ 1@ 2@ in_radius 3.0 find_next 1 pass_deads 1 //IF and SET
jf @Bumblebee_P_D_2
if
not Actor.Driving($actor)
jf @Bumblebee_P_D
Audiostream.Release(15@)
15@ = Audiostream.Load("CLEO/Sound/metal_hit.WAV")
Audiostream.PerformAction(15@,PLAY)
04C4: store_coords_to 4@ 5@ 6@ from_actor $PLAYER_ACTOR with_offset 0.0 8.0 0.0 
04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 
0063: 4@ -= 7@ // (float) 
0063: 5@ -= 8@ // (float) 
0063: 6@ -= 9@ // (float) 
0013: 4@ *= 5.0 
0013: 5@ *= 5.0
00A0: store_actor $actor position_to 7@ 8@ 9@ 
08C7: put_actor $actor at 7@ 8@ 9@ dont_warp_gang 
083C: set_actor $actor velocity_in_direction_XYZ 4@ 5@ 6@
wait 100
0321: kill_actor $actor
jump @Bumblebee_2

:Bumblebee_P_D_2
wait 0
if
0AE2: $car = random_vehicle_near_point 0@ 1@ 2@ in_radius 8.0 find_next 1 pass_wrecked 1 //IF and SET
jf @Bumblebee_P_D_3
Audiostream.Release(15@)
15@ = Audiostream.Load("CLEO/Sound/metal_hit.WAV")
Audiostream.PerformAction(15@,PLAY)
04C4: store_coords_to 16@ 17@ 18@ from_actor $PLAYER_ACTOR with_offset 0.0 5.0 0.0 
04C4: store_coords_to 19@ 20@ 21@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 
0063: 16@ -= 19@ // (float) 
0063: 17@ -= 20@ // (float) 
0013: 16@ *= 0.2 
0013: 17@ *= 0.2 
07D5: set_car $car velocity_in_direction_XYZ 16@ 17@ 0.0 rotation_velocitiesXY 0.0 0.0 unk 0.0 
jump @Bumblebee_2

:Bumblebee_P_D_3
wait 500
0792: disembark_instantly_actor $PLAYER_ACTOR 
jump @Bumblebee_2

:Bumblebee_Gr
wait 0
if
0AB0: 89
jf @Bumblebee_2
0812: AS_actor $PLAYER_ACTOR perform_animation "WEAPON_start_throw" IFP_file "Grenade" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB  
wait 20
0812: AS_actor $PLAYER_ACTOR perform_animation "WEAPON_throwu" IFP_file "Grenade" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB  
wait 670
Model.Load(#GRENADE)
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0
13@ = Actor.Angle($PLAYER_ACTOR)
Object.Create(10@,#GRENADE,0@,1@,2@)
0382: set_object 10@ collision_detection 0
0750: set_object 10@ visibility 0 
Object.Angle(10@) = 13@
3@ = 0.0
4@ = 0.0
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 3@ 4@ 0.0
30@ = 0
jump @Bumblebee_Gr_1

:Bumblebee_Gr_1
wait 0
if
30@ < 40
jf @Bumblebee_Gr_2
gosub @Camera
0400: store_coords_to 0@ 1@ 2@ from_object 10@ with_offset 3@ 4@ 0.0 
0208: 3@ = random_float_in_ranges 10.0 -10.0
0208: 4@ = random_float_in_ranges -5.0 15.0 
0400: store_coords_to 0@ 1@ 2@ from_object 10@ with_offset 3@ 4@ 0.0 
020C: create_explosion_with_radius 3 at 0@ 1@ 2@
30@ += 1
jump @Bumblebee_Gr_1 

:Bumblebee_Gr_2
wait 0
Object.Destroy(10@)
Model.Destroy(#GRENADE)
jump @Bumblebee_2

:Bumblebee_L
wait 0
if 
0AB0: 2
jf @Bumblebee_2
gosub @aim 
04C4: store_coords_to $91 $92 $93 from_actor $PLAYER_ACTOR with_offset 2.0 2.9 2.52 
0920: point_camera $91 $92 $93 transverse_to $91 $92 $93 time 100 smooth_transition 1
gosub @Camera
0AB1: call_scm_func @getScreenXYFrom3DCoords 3 coords_XYZ 8@ 9@ 10@ store_to 2@ 3@ 
03F0: enable_text_draw 1 
03E3: set_texture_to_be_drawn_antialiased 1
038D: draw_texture 1 position 2@ 3@ size 25.0 25.0 RGBA 255 255 255 255
if
0AB0: 1
jf @Bumblebee_L
gosub @Bumblebee_G
jump @Bumblebee_L

:Bumblebee_G
Audiostream.Release(15@)
15@ = Audiostream.Load("Cleo\Sound\Wshoot.mp3")                       
Audiostream.PerformAction(15@,PLAY)
0669: 15@ = attach_particle "Camflash" to_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 flag 1 
0883: attach_particle 15@ to_actor $PLAYER_ACTOR mode 24 
064F: remove_references_to_particle 15@ 
020C: create_explosion_with_radius 3 at 8@ 9@ 10@
return

:Bumblebee_T 
wait 0
if
0AB0: 84
jf @Bumblebee_2
Audiostream.Release(15@)
15@ = Audiostream.Load("Cleo\Sound\Car.fsb")
Audiostream.PerformAction(15@,PLAY)
0812: AS_actor $PLAYER_ACTOR perform_animation "Mixmast_Start" IFP_file "Mixmast" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB 
wait 670
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset -1.02 -0.05 0.0 
13@ = Actor.Angle($PLAYER_ACTOR)
Car.Create(20@,#SUPERGT,0@,1@,2@)
Car.Angle(20@) = 13@
Car.DoorStatus(20@,4)
Camera.Restore($PLAYER_ACTOR)
036A: put_actor $PLAYER_ACTOR in_car 20@ 
0657: car 20@ open_door 2
0657: car 20@ open_door 3
Car.SetSpeedInstantly(20@, 10.0)
0229: set_car 20@ primary_color_to 8 secondary_color_to 3
0A96: 14@ = actor $PLAYER_ACTOR struct 
0A8E: 5@ = 14@ + 1140 // int 
0A8D: 10@ = read_memory 5@ size 4 virtual_protect 0 
0A8C: write_memory 5@ size 4 value 2 virtual_protect 0
wait 200
0508: car 20@ close_all_doors
jump @Bumblebee_B

:Bumblebee_B
wait 0
if
0AB0: 84
jf @Bumblebee_B
Audiostream.Release(15@)
15@ = Audiostream.Load("Cleo\Sound\Bot.fsb")
Audiostream.PerformAction(15@,PLAY)
0657: car 20@ open_door 2
0657: car 20@ open_door 3
wait 100
0A8C: write_memory 5@ size 4 value 10@ virtual_protect 0
Car.StorePos(20@,0@,1@,2@)
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 0@ 1@ 2@
Car.Destroy(20@)
0812: AS_actor $PLAYER_ACTOR perform_animation "Bumblebee_Tbot" IFP_file "Bumblebee" 4.0 loopA 0 lockX 0 lockY 0 lockF 0 time -1 // versionB                  
jump @Bumblebee_B_C

:Bumblebee_B_C
wait 0
0613: 16@ = actor $PLAYER_ACTOR animation "Bumblebee_Tbot" time
if
16@ < 0.93
jf @Bumblebee_B_D 
jump @Bumblebee_B_C

:Bumblebee_B_D
wait 0
0792: disembark_instantly_actor $PLAYER_ACTOR 
jump @Bumblebee_2

:Camera
if 
83CA:   not object $CAMS exists 
else_jump @Camera_Off
Model.Load(3100)
038B: load_requested_models 
Actor.StorePos($PLAYER_ACTOR, $C10, $C11, $C12)
$CAMS = Object.Create(3100, $C10, $C11, $C12)
0750: set_object $CAMS visibility 0 
Object.Angle($CAMS) = 0.0
0453: set_object $CAMS XYZ_rotation 0.0 0.0 0.0 
069B: attach_object $CAMS to_actor $PLAYER_ACTOR with_offset 0.0 -1.0 3.0 rotation 0.0 0.0 0.0 
0400: store_coords_to $C10 $C11 $C12 from_object $CAMS with_offset 0.0 0.0 0.0 
Camera.SetPosition($C10, $C11, $C12, 0.0, 0.0, 0.0)
0400: store_coords_to $C10 $C11 $C12 from_object $CAMS with_offset 0.0 0.0 0.0 
Camera.PointAt($C10, $C11, $C12, 2)
$C4 = 0.0 
$C5 = 0.0 
Model.Destroy(3100)
Camera.Restore
return

:Camera_Off
if 
03CA:   object $CAMS exists 
else_jump @Check_4
0A4A: store_joystick_X_offset_to $C20 Y_offset_to $C21 
$C20 /= 8.0 
$C21 /= 8.0 
0063: $C4 -= $C20 // (float) 
0063: $C5 -= $C21 // (float) 
0453: set_object $CAMS XYZ_rotation $C5 0.0 $C4 
0400: store_coords_to $C10 $C11 $C12 from_object $CAMS with_offset 0.0 9.0 3.0 
Camera.SetPosition($C10, $C11, $C12, 0.0, 0.0, 0.0)
0400: store_coords_to $C10 $C11 $C12 from_object $CAMS with_offset 0.0 0.0 0.0 
Camera.PointAt($C10, $C11, $C12, 2)

:Check_4
return 

:aim
for 4@ = 1.0 to 1000.0 step 1.0
    04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 2.04 2.9 2.52
    0A9F: 5@ = current_thread_pointer
    000A: 5@ += 0x50 
    0A8E: 6@ = 5@ + 0xC // (int)
    0AA6: call_method 0x514970 struct 0xB6F028 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@
    if   86BD:   obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 1 object 1 particle 0
    then  break
    end
end
return

:getScreenXYFrom3DCoords
//0AB1: call_scm_func @getScreenXYFrom3DCoords 3 coords_XYZ 2488.562 -1666.865 12.8757 store_to 1@ 2@ 
0AB1: call_scm_func @getLocalVarOffset 1 var 0 store_to 7@ 
0AB1: call_scm_func @getLocalVarOffset 1 var 3 store_to 8@ 
0AB1: call_scm_func @getLocalVarOffset 1 var 5 store_to 9@ 
0AB1: call_scm_func @getLocalVarOffset 1 var 6 store_to 10@ 
0AA5: call 0x70CE30 num_params 6 pop 6 bFarClip 0 bNearClip 0 pMultY 10@ pMultX 9@ pScreen 8@ pCoords 7@ 
0AB1: call_scm_func @getScreenXY 2 coords_XY 3@ 4@ store_to 3@ 4@ 
0AB2: ret 2 3@ 4@ 

:getScreenXY
//0AB1: call_scm_func @getScreenXY 2 coords_XY 512.0 384.0 store_to 1@ 2@ 
0A8D: 2@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X
0A8D: 3@ = read_memory 0x859520 size 4 virtual_protect 0 // screen X scale
0093: 2@ = integer 2@ to_float
006B: 2@ *= 3@ 
0073: 0@ /= 2@ 
0A8D: 5@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y
0A8D: 6@ = read_memory 0x859524 size 4 virtual_protect 0 // screen Y scale
0093: 5@ = integer 5@ to_float
006B: 5@ *= 6@ 
0073: 1@ /= 5@ 
0AB2: ret 2 0@ 1@ 

:getLocalVarOffset
//0AB1: call_scm_func @getLocalVarOffset 1 var 0 store_to 1@ 
0@ *= 0x4 
0A9F: 1@ = current_thread_pointer
0A8E: 2@ = 1@ + 0xDC 
0A8D: 2@ = read_memory 2@ size 1 virtual_protect 0 // bMissionFlag
if   2@ == 1 
then
    0@ += 0xA48960 // pMissionLocals
else
    005A: 0@ += 1@ 
    0@ += 0x3C // pThreadLocals
end
0AB2: ret 1 0@

{$CLEO .cs}
0000:
:Mask_L
wait 0
if
0AB0: 76
jf @Mask_L
023C: load_special_actor 'Jazz' as 1 // models 290-299 
023C: load_special_actor 'Jazzw' as 2 // models 290-299 
jump @Mask_on

:Mask_on
wait 0
if and
Model.Available(#SPECIAL01)
Model.Available(#SPECIAL02)
jf @Mask_On
09C7: change_player $PLAYER_CHAR model_to #SPECIAL01 
jump @Mask_Off

:Mask_Off
wait 0
if
0AB0: 70
jf @Mask_Off
09C7: change_player $PLAYER_CHAR model_to #SPECIAL02
Model.Destroy(#SPECIAL01)
Model.Destroy(#SPECIAL02)
jump @Mask_L